Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Direct Draw Surface Draw Context Structure

QuickDraw 3D defines the direct draw surface draw context data structure to maintain information that is specific to Windows direct draw surface draw contexts. The Windows direct draw surface draw context data structure is defined by the TQ3DDSurfaceDrawContextData data type.

typedef enum {
    kQ3DirectDrawObject     = 1,
    kQ3DirectDrawObject2    = 2
} TQ3DirectDrawObjectSelector;
typedef enum {
    kQ3DirectDrawSurface    = 1,
    kQ3DirectDrawSurface2   = 2
} TQ3DirectDrawSurfaceSelector;
typedef struct TQ3DDSurfaceDescriptor {
    TQ3DirectDrawObjectSelector     objectSelector;
    union
    {
        LPDIRECTDRAW    lpDirectDraw;
        LPDIRECTDRAW2   lpDirectDraw2;
    };
    TQ3DirectDrawSurfaceSelector    surfaceSelector;
    union
    {
        LPDIRECTDRAWSURFACE     lpDirectDrawSurface;
        LPDIRECTDRAWSURFACE2    lpDirectDrawSurface2;
    };
} TQ3DDSurfaceDescriptor;
typedef struct TQ3DDSurfaceDrawContextData {
    TQ3DrawContextData          drawContextData;
    TQ3DDSurfaceDescriptor      ddSurfaceDescriptor;
} TQ3DDSurfaceDrawContextData;
objectSelector
A Direct Draw object selector that specifies whether the caller is using version 1 or version 2 Direct Draw objects.
lpDirectDraw
Direct Draw context data.
surfaceSelector
A Direct Draw surface selector that specifies whether the caller is using version 1 or version 2 Direct Draw surfaces.
lpDirectDrawSurface
Direct Draw surface context data.
drawContextData
A draw context data structure defining basic information about the draw context.
ddSurfaceDescriptor
The union of an object selector and a surface selector.

Data for the lpDirectDraw and lpDirectDrawSurface fields can be obtained within Microsoft Windows by calling IDirectDraw::CreateSurface or IDirectDraw::GetGDISurface .


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |